<template>
	<!-- tab切换 示例 -->
	<view>
		<c-tabs :dataList="tabList" :tabIndex="tabIndex" @change="changeFn"></c-tabs>
		<!-- <c-scroll-list ref="list" :api="getList" :apiParams="apiParams" :option="option" @load="(res)=>(list=res)">
		
		</c-scroll-list> -->

		<!-- 替换 list.list -->
		<view class="">
			<scroll-view v-show="tabIndex == 0" class="sv" scroll-y="true">
				<view v-for="(v,i) in 60" :key="i">{{i}}</view>
			</scroll-view>
			<scroll-view v-show="tabIndex == 1" class="sv" scroll-y="true">
				<view v-for="(v,i) in 60" :key="i">{{i}}</view>
			</scroll-view>
			<scroll-view v-show="tabIndex == 2" class="sv" scroll-y="true">
				<view v-for="(v,i) in 60" :key="i">{{i}}</view>
			</scroll-view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabList: ['订单消息1', '订单消息2', '订单消息3'],
				tabIndex: 0,
			}
		},
		methods: {
			// 修改tab选项
			changeFn(val, inx) {
				console.log('val,inx', val, inx);
				this.tabIndex = inx
			}
		}
	}
</script>

<style lang="scss" scoped>
	.sv {
		height: 300rpx;
	}
</style>